package com.zy.web.demo.duoxiancheng.demo5;

/**
 * @author <a href="mailto:zhouyong@cqyyt.com">zy</a>
 * @version 1.0
 * @date 2020/7/29 9:49
 * 停止线程return
 */
public class MyThread extends Thread {

    @Override
    public void run() {
//        super.run();
        while (true){
            if (this.isInterrupted()){
                System.out.println("停止了");
                return;
            }
            System.out.println("时间="+System.currentTimeMillis());
        }

    }
}
